package com.alibaba.yinan.domain.resource.domain;

import com.alibaba.yinan.domain.resource.CassetteType;
import com.alibaba.yinan.domain.resource.StorageAreaType;

import java.util.Set;

/**
 * @author yinan
 * 灵活库位
 */
public class FlexibleStorageSlot extends BaseStorageSlot {

    private final Set<CassetteType> supportedTypes;

    public FlexibleStorageSlot(String code, StorageAreaType areaType, Set<CassetteType> supportedTypes) {
        super(code, areaType);
        this.supportedTypes = supportedTypes;
    }

    @Override
    protected boolean support(Cassette cassette) {
        return supportedTypes.contains(cassette.getCassetteType());
    }
}
